<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    
  </style>
</head>
<body>
  
</body>
<script>

  // let str = "hello" + 
  // "world";

  // let str = "hello\nworld";
  
  // let str = `hello
  // world`;

  
  // let msg = "天气";
  // let str = `今天'${msg}'真好`;
  // let str = `今天"${msg}"真好`;
  // let str = `今天'"'"'"${msg}'"'"'"'真好`;
  // let str = `今天'"'"'"${ 1+1 }'"'"'"'真好`;
  // let str = `今天'"'"'"${ fn() }'"'"'"'真好`;

  // function fn(){
  //   return "hhaah "
  // }

  // console.log(str);



  // ==========


  const str = "hello world";

  console.log( str.repeat(5) );

  console.log( str.includes("o") );
  console.log( str.includes("a") );

  console.log( str.startsWith("h") );
  console.log( str.startsWith("a") );
  
  console.log( str.endsWith("d") );
  console.log( str.endsWith("a") );


  // 无法使用一个四位的十六进制的文字的转换

  // 转编码
  console.log( '𠮶'.codePointAt() );
  // 转字符
  console.log( String.fromCodePoint(134070) );
    
  // ES6之前的转换方法
  // console.log( '𠮶'.charCodeAt(0) );
  // console.log( '𠮶'.charCodeAt(1) );
  // console.log( String.fromCharCode(55362, 57270) )
</script>
</html>